﻿@using CV.Resources
@model IEnumerable<CV.Model.Person>

@{
    ViewBag.Title = "People";
}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <h2 class="page-header">@Resources.People</h2>

    <p>
        @Html.ActionLink(Resources.Create, "Create")
    </p>
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.LastName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.BirthName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.FirstName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.MartialStatus)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.NumberOfChildren)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.BirthDate)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.PlaceOfBirth)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Nationality)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.MotherId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.FatherId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Notes)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Category)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.LastName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.BirthName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.FirstName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.MartialStatus)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.NumberOfChildren)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.BirthDate)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.PlaceOfBirth)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Nationality)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.MotherId)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.FatherId)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Notes)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Category)
                </td>
                <td>
                    @Html.ActionLink(Resources.Edit, "Edit", new { id = item.ID }) |
                    @Html.ActionLink(Resources.Details, "Details", new { id = item.ID }) |
                    @Html.ActionLink(Resources.Delete, "Delete", new { id = item.ID })
                </td>
            </tr>
        }

    </table>
</div>